package com.dingmouren.smaple.paletteimageview.slice;

import com.dingmouren.smaple.paletteimageview.ResourceTable;
import com.dingmouren.smaple.paletteimageview.adapter.GalleryProvider;
import ohos.aafwk.content.Intent;
import ohos.agp.components.PageSlider;

public class GalleryAbilitySlice extends BaseAbilitySlice {

    @Override
    public void onStart(Intent intent) {
        super.onStart(intent);
        super.setUIContent(ResourceTable.Layout_ability_gallery);
        initView();

    }

    public void initView() {
        PageSlider gallery = findComponent(ResourceTable.Id_list);
        gallery.setProvider(new GalleryProvider(this, mHeros));
    }

    @Override
    public void onActive() {
        super.onActive();
    }

    @Override
    public void onForeground(Intent intent) {
        super.onForeground(intent);
    }

    final static int[] mHeros = new int[]{
            ResourceTable.Media_p8,
            ResourceTable.Media_p16,
            ResourceTable.Media_p5,
            ResourceTable.Media_p17,
            ResourceTable.Media_p20,
            ResourceTable.Media_p15,
            ResourceTable.Media_p6,
            ResourceTable.Media_p2,
            ResourceTable.Media_p3,
            ResourceTable.Media_p4,
            ResourceTable.Media_p7,
            ResourceTable.Media_p1,
            ResourceTable.Media_p9,
            ResourceTable.Media_p10,
            ResourceTable.Media_p11,
            ResourceTable.Media_p12,
            ResourceTable.Media_p13,
            ResourceTable.Media_p14,
            ResourceTable.Media_p18,
            ResourceTable.Media_p19,
    };

}
